	<div class="path">
			
	<a href="index.php">Dashboard</a> > <a href="#">Job Management</a> > <a href="index.php?module=viewjobs">View Jobs</a></div>

  <div class="main">		
		
		<div class="content">

			<h1>View Jobs</h1>
            <div class="descr">Click the job title to edit a specific job.</div>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th width="5%" bgcolor="#E0EBFC" scope="col">JobID</th>
    <th width="81%" bgcolor="#E0EBFC" scope="col">Job Title</th>
    <th width="14%" bgcolor="#E0EBFC" scope="col">Date/Time</th>
  </tr>
</table>
<?php
// Query to select data from table
$query = "SELECT * FROM jobs ORDER BY JobID DESC";
$result = mysql_query($query); 
// Check if we are able to select data from table
if (!$result) {
	echo "Unable to fetch any Job Listings, there maybe a problem with the database.";
} else {
	while($row = mysql_fetch_array($result)):
?>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5%" align="center" valign="middle"><?php echo $row['JobID']; ?></td>
    <td width="81%"><a href="editjob.php?id=<?php echo $row['JobID']; ?>"><?php echo $row['JobTitle']; ?></a> <a href="index.php?do=deletejob&id=<?php echo $row['JobID']; ?>">(Delete)</a></td>
    <td width="14%"><?php echo $row['Timestamp']; ?></td>
  </tr>
</table>
<?php endwhile ?>
<?php } ?>
</div>